import request from '@/utils/request'

// 查询指令代码列表
export function listInstructionCode(query) {
  return request({
    url: '/base/InstructionCode/list',
    method: 'get',
    params: query
  })
}

// 查询指令代码详细
export function getInstructionCode(icId) {
  return request({
    url: '/base/InstructionCode/' + icId,
    method: 'get'
  })
}

// 新增指令代码
export function addInstructionCode(data) {
  return request({
    url: '/base/InstructionCode',
    method: 'post',
    data: data
  })
}

// 修改指令代码
export function updateInstructionCode(data) {
  return request({
    url: '/base/InstructionCode',
    method: 'put',
    data: data
  })
}

// 删除指令代码
export function delInstructionCode(icId) {
  return request({
    url: '/base/InstructionCode/' + icId,
    method: 'delete'
  })
}

// 导出指令代码
export function exportInstructionCode(query) {
  return request({
    url: '/base/InstructionCode/export',
    method: 'get',
    params: query
  })
}

//修改状态
export function changeInsFlag1(icId,icInputflag){

  const data = {
    icId,icInputflag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
export function changeInsFlag2(icId,icBurrowflag){

  const data = {
    icId,icBurrowflag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
export function changeInsFlag3(icId,icBadflag){

  const data = {
    icId,icBadflag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
export function changeInsFlag4(icId,icCountflag){

  const data = {
    icId,icCountflag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
export function changeInsFlag5(icId,icOrdermodelflag){

  const data = {
    icId,icOrdermodelflag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
export function changeInsFlag6(icId,icFlag){

  const data = {
    icId,icFlag
  }
  return request({
    url: '/base/InstructionCode/changeInsFlag',
    method: 'put',
    data: data
  })
}
